package com.qf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.pojo.DtsBrand;
import com.qf.vo.CatVo;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 品牌商表 Mapper 接口
 * </p>
 *
 * @author zhaojian
 * @since 2021-05-12
 */
public interface DtsBrandMapper extends BaseMapper<DtsBrand> {

    @Select("select id as value, username as label from dts_admin ")
    List<CatVo> find();

    @Select("select id as value, name as label from dts_category where pid=0 ")
    List<CatVo> findcategory();
    @Select("select id as value,name as label from dts_category where pid!=0")
    List<CatVo> findchilder();

    @Update("UPDATE `dts_brand` SET `deleted`=1 WHERE `id`=#{id}")
    void deleteUpdateById(Integer id);
}
